package day16_Runnable.demo09例子;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
//把文件E:\csw\Demo\a\data.txt里的数据扩大5000倍
public class DemoTest {
    public static void main(String[] args) throws Exception{
        BufferedReader br = new BufferedReader(new FileReader("E:\\csw\\Demo\\a\\data.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("E:\\csw\\Demo\\a\\bigdata.txt"));
        String s;
        while ((s=br.readLine())!=null){
            for (int i =1; i <=5000; i++) {
                bw.write(s);
                bw.newLine();
            }
        }
        br.close();
        bw.close();
    }
}
